#!/bin/bash

IOSIG_LIB_PATH = ../../collect
IOSIG_CFLAGS    += -w -finstrument-functions 
IOSIG_LDFLAGS   += -L../../collect -liosig 
IOSIG_LDFLAGS   += -Wl,-wrap,fopen,-wrap,fopen64,-wrap,fclose,-wrap,fread,-wrap,fwrite,-wrap,fseek,-wrap,open,-wrap,close,-wrap,read,-wrap,write,-wrap,lseek,-wrap,lseek64,-wrap,open64

CFLAGS    += ${IOSIG_CFLAGS}
LDFLAGS   += ${IOSIG_LDFLAGS}

main: main.o 
	gcc main.o -o main ${LDFLAGS}


main.o: main.c
	gcc ${CFLAGS} -g -c -o main.o main.c

clean:
	rm *.o main

